package br.com.hhc.sample.fullstackspringhibernate.database.data.domain;

// Generated 18/03/2015 07:46:00 by Hibernate Tools 4.3.1

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * Classes generated by hbm2java
 */
@Entity
@Table(name = "CLASSES")
public class Classes implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

	private Integer id;
	private String name;
	private char[] description;
	private Integer credits;
	private Set<StudentClasses> studentClasseses = new HashSet<StudentClasses>(0);
	private Set<InstructorClasses> instructorClasses = new HashSet<InstructorClasses>(0);

	public Classes() {
	}

	@Id
	@Column(name = "CLASSES_ID", unique = true, nullable = false)
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_CLASSES_ID")
	@SequenceGenerator(name = "SEQ_CLASSES_ID", sequenceName = "SEQ_CLASSES_ID", allocationSize=1, initialValue=1)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer classesId) {
		this.id = classesId;
	}

	@Column(name = "CLASSES_NAME", nullable = false, length = 256)
	public String getName() {
		return this.name;
	}

	public void setName(String classesName) {
		this.name = classesName;
	}

	@Lob
	@Column(name = "CLASSES_DESCRIPTION", nullable = false)
	public char[]  getDescription() {
		return this.description;
	}

	public void setDescription(char[] classesDescription) {
		this.description = classesDescription;
	}

	@Column(name = "CLASSES_CREDITS", nullable = false, precision = 3, scale = 0)
	public Integer getCredits() {
		return this.credits;
	}

	public void setCredits(Integer classesCredits) {
		this.credits = classesCredits;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "classes")
	public Set<StudentClasses> getStudentClasseses() {
		return this.studentClasseses;
	}

	public void setStudentClasseses(Set<StudentClasses> studentClasseses) {
		this.studentClasseses = studentClasseses;
	}
	
	
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "classes")
	public Set<InstructorClasses> getClasseses() {
		return this.instructorClasses;
	}

	public void setClasseses(Set<InstructorClasses> _instructorClasses) {
		this.instructorClasses = _instructorClasses;
	}

}

